// default package
// Generated 04.01.2014 16:35:54 by Hibernate Tools 4.0.0
package com.techtransteam.techtransteamWeb.dal.entities;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.OneToOne;
import javax.persistence.PrimaryKeyJoinColumn;
import javax.persistence.Table;
import org.hibernate.annotations.GenericGenerator;
import org.hibernate.annotations.Parameter;

/**
 * UserInfo generated by hbm2java
 */
@Entity
@Table(name = "user_info")
public class UserInfo implements java.io.Serializable {

	private long idUser;
	private User user;

	public UserInfo() {
	}

	public UserInfo(User user) {
		this.user = user;
	}

	@GenericGenerator(name = "generator", strategy = "foreign", parameters = @Parameter(name = "property", value = "users"))
	@Id
	@GeneratedValue(generator = "generator")
	@Column(name = "id_user", unique = true, nullable = false)
	public long getIdUser() {
		return this.idUser;
	}

	public void setIdUser(long idUser) {
		this.idUser = idUser;
	}

	@OneToOne(fetch = FetchType.LAZY)
	@PrimaryKeyJoinColumn
	public User getUsers() {
		return this.user;
	}

	public void setUsers(User user) {
		this.user = user;
	}

}
